package com.ruoyi.common.core.enums;

/**
 * 物流承运商枚举
 */
public enum LogisticsEnum {
    SF("SF","顺丰速运"),
    BS("BS","百世快递"),
    YT("YT","圆通速递"),
    YD("YD","韵达速递"),
    ST("ST","申通快递"),
    EMS("EMS","EMS"),
    JD("JD","京东快递"),
    UC("UC","优速快递"),
    DB("DB","德邦快递"),
    ZT("ZT","中通"),
    OTHER("OTHER","其他"),
    KEC("KEC","嘉里物流"),
    YFH("YFH","原飞航物流");

    private final String code;
    private final String name;

    LogisticsEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String getNameByCode(String code)
    {
        for (LogisticsEnum item : LogisticsEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getName();
            }
        }

        return "";
    }

}
